package com.ld.security.server.admin.modules.ge.po;

import com.ld.security.common.core.base.SuperVo;
import com.ld.security.common.mybatis.anno.QueryKey;
import com.ld.security.common.mybatis.anno.SaveKey;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.server.admin.modules.ge.entity.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

@Data
public class ViewSavePo implements SuperVo {



    @ApiModelProperty("视图")
    @SaveKey
    @NotNull
    private GeViewEntity view;

    @SaveKey(name = "viewId",valueField = "view.id")
    @ApiModelProperty("模型")
    private List<GeModelEntity> models;


    @SaveKey(name = "viewId",valueField = "view.id")
    @ApiModelProperty("视图函数")
    private List<GeFuncEntity> viewFuncs;

    @SaveKey(name = "viewId",valueField = "view.id")
    @ApiModelProperty("组件列表")
    private List<GeCompEntity> comps;

//    @QueryKey(groupKey = "id")
//    @SqlKey(name = "viewTelId",value = SqlCondition.in,valueField = "view.viewTelId")
//    private Map<String,GeModelTelEntity> modelTelMap;
//
//    @QueryKey(groupKey = "id")
//    @SqlKey(name = "viewTelId",value = SqlCondition.in,valueField = "view.viewTelId")
//    private Map<String,GeFuncTelEntity> funcTelMap;
//



//    public GeModelTelEntity getModelTel(String id){
//        return modelTelMap.get(id);
//    }
//
//    public GeFuncTelEntity getFuncTel(String id){
//        return funcTelMap.get(id);
//    }



}
